package at.fhooe.engine.entity;

import at.fhooe.engine.physics.PhysicBody;

public abstract class Entity implements Updateable {
	
	protected String m_entityId;
	protected String m_name;
	
	public Entity(String entityId, String name) {
		m_entityId = entityId;
		m_name = name;
	}
	
	public String getEntityId() {
		return m_entityId;
	}
	
	public String getName() {
		return m_name;
	}
	
	public void engage() {
		initialize();
	}
	
	public void disengage() {
		deinitialize();
	}
	
	//A entity equals another entity if their names are the same
	public boolean equals(Object other) {
		if(other instanceof Entity) {
			return m_name.equals(((Entity) other).getName());
		}
		return super.equals(other);
		
	}

	public abstract double[] getDebug();
	
	protected abstract void initialize();
	
	protected abstract void deinitialize();
	
	public abstract void update();
	
	public abstract PhysicBody getPhysicBody();
}
